package org.alanlau.dynamic.jdk;

/**
 * 测试类
 * @author alan
 * @version 1.0
 * @date 2020/1/12 10:09
 */
public class JDKDynamicTest {
    public static void main(String[] args) {
        JDKDynamicProxy jdkDynamicProxy = new JDKDynamicProxy();
        TestDao testDao = new TestDaoImpl();
        TestDao testDaoAdvice = (TestDao)jdkDynamicProxy.createProxy(testDao);
        // 执行方法
        testDaoAdvice.save();
        System.out.println("=====================");
        testDaoAdvice.modify();
        System.out.println("=====================");
        testDaoAdvice.delete();
    }
}
